name = "zhangsan"
age = 10

if name == "zhangsan" and age == 10:
    print("Hello , zhangsan")


if name == "zhangsan"  or name == "lisi":
    print(f"Hello {name}")

# 检查特定值是否在数组中
requested_toppings = ['mushrooms', 'onions', 'pineapple']
print( 'mushrooms' in requested_toppings)
print( 'mushrooms' not in requested_toppings)


#  if  else
age = 17
if age >= 18:
    print("You are old enough to vote!")
    print("Have you registered to vote yet?")
else:
    print("Sorry, you are too young to vote.")
    print("Please register to vote as soon as you turn 18!")

#  if elif else
age = 12
if age < 4:
    print("Your admission cost is $0.")
elif age < 18:
    print("Your admission cost is $25.")
else:
    print("Your admission cost is $40.")

# 对于数值 0、空值 None、单引号空字符串 ''、双引号空字符串 ""、空列表 []、空元组 ()、空字典 {}，Python 都会返回 False
hello = []
if hello:
    print(age)